<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>tabs选项卡面板</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script type="text/javascript">
			 // 页面加载后执行
			$(function() {
				// 对链接绑定点击事件
				$("#czbkLink").click(function() {
					// 添加一个新的选项卡 
					var newTab = $('#mytabs').tabs('exists', '传智播客');
					if (newTab) {
						$('#mytabs').tabs('select', '传智播客');
					} else {
						$("#mytabs").tabs('add', {
							title: '传智播客',
							content: '传智播客专注IT培训教育',
							closable: true,
							tools: [{
								iconCls: 'icon-mini-refresh'
							}]
						});
					}
				});
				$('#mytabs').tabs({
					onContextMenu: function(e, title, index) {
						e.preventDefault();
						$('#mm').menu('show',{
							left:e.pageX,
							top:e.pageY
						});
					}
				})
				
				$('#menu-exit').click(function(){
				
					var pp=$('#mytabs').tabs('getSelected');
					var index=$('#mytabs').tabs('getTabIndex',pp);
					$('#mytabs').tabs('close',index);
					
				});
			});
		</script>
	</head>

	<body class="easyui-layout">
		<div data-options="region:'north',title:'传智播客管理系统'" style="height: 100px;">北部区域</div>
		<div data-options="region:'west',title:'菜单导航'" style="width: 180px;">
			<!--折叠面板 -->
			<div class="easyui-accordion" data-options="fit:true">
				<div data-options="title:'基础菜单'">
					<!-- -->
					<a href="javascript:void(0)" id="czbkLink">传智播客</a>
				</div>
				<div data-options="title:'系统菜单'">面板二</div>
			</div>
		</div>
		<div data-options="region:'center'">
			<!-- 选项卡面板-->
			<div id="mytabs" class="easyui-tabs" data-options="fit:true">
				<div data-options="title:'选项卡面板一',closable:true">选项卡面板一</div>
				<div data-options="title:'选项卡面板二'">选项卡面板二</div>
			</div>
		</div>
		<div data-options="region:'east'" style="width: 80px;">东部区域</div>
		<div data-options="region:'south'" style="height: 80px;">南部区域</div>



		<div id="mm" class="easyui-menu" style="width:120px;">

			<div>New</div>

			<div>

				<span>Open</span>

				<div style="width:150px;">

					<div><b>Word</b></div>

					<div>Excel</div>

					<div>PowerPoint</div>

				</div>

			</div>

			<div data-options="iconCls:'icon-save'">Save</div>

			<div class="menu-sep"></div>

			<div id='menu-exit'>Exit</div>

		</div>

	</body>

</html>